﻿<UserControl x:Class="Blacklight.ShowCase.Samples.DragDockPanelSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:controls="clr-namespace:Blacklight.Controls;assembly=Blacklight.Controls"
             xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">
    
    <UserControl.Resources>

        <controls:ResourceDictionaryManager x:Key="ResourceDictionaryManager">
            <controls:ResourceDictionaryManager.ResourceDictionaries>
                <controls:ResourceDictionaryCollection>

                    <controls:ResourceDictionary Path="/Blacklight.ShowCase;component/ResourceDictionaries/DavesGlossyControls.xaml">
                        <controls:ResourceDictionary.ResourceKeys>
                            <controls:ResourceKeyCollection>
                                <controls:ResourceKey ResourceName="BlackGlossyButton" />
                                <controls:ResourceKey ResourceName="GlossyBlackComboBox" />
                            </controls:ResourceKeyCollection>
                        </controls:ResourceDictionary.ResourceKeys>
                    </controls:ResourceDictionary>

                </controls:ResourceDictionaryCollection>
            </controls:ResourceDictionaryManager.ResourceDictionaries>
        </controls:ResourceDictionaryManager>

    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5"
                   Text="Minimize Position" VerticalAlignment="Center" />
        <ComboBox Width="195" Grid.Column="1" HorizontalAlignment="Left" Margin="10,5,5,5" x:Name="minimizedPositionComboBox" Style="{StaticResource GlossyBlackComboBox}"
                  Foreground="White" FontFamily="Verdana" Height="25">
            <ComboBoxItem Content="Right" IsSelected="True" />
            <ComboBoxItem Content="Bottom" />
            <ComboBoxItem Content="Left" />
            <ComboBoxItem Content="Top" />
        </ComboBox>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Column="2" TextWrapping="Wrap"
                   Text="(The position where the panels minimize to. Either Right, Bottom, Left or Top)" VerticalAlignment="Center" />
        
        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5"
                   Text="Add / Remove Panels" VerticalAlignment="Center" Grid.Row="1" />
        <StackPanel Grid.Column="1" HorizontalAlignment="Left" Margin="8,5,5,5" Grid.Row="1" Orientation="Horizontal">
            <Button x:Name="addPanelButton" Content="Add Panel" Margin="0,0,5,0" Width="98" Style="{StaticResource BlackGlossyButton}" Foreground="White" FontFamily="Verdana" Height="25" />
            <Button x:Name="removePanelButton" Content="Remove Panel" Width="98"  Style="{StaticResource BlackGlossyButton}" Foreground="White" FontFamily="Verdana" Height="25"/>
        </StackPanel>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Column="2" TextWrapping="Wrap"
                   Text="(Click to dynamically add or remove panels)" VerticalAlignment="Center" Grid.Row="1" />
        
        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="2"
                   Text="Max Rows / Columns" VerticalAlignment="Center" />
        <StackPanel Grid.Column="1" Grid.Row="2" Margin="5" VerticalAlignment="Center" Orientation="Horizontal">
            <TextBox Width="60" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="maxRows" />
            <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="2"
                   Text=" / " VerticalAlignment="Center" />
            <TextBox Width="60" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="maxColumns" />
        </StackPanel>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="2" Grid.Column="2" TextWrapping="Wrap"
                   Text="(The maximum rows / columns. 0 for no maximum. MaxRows takes priority over MaxColumns (e.g. if MaxRows is set to > than 0, MaxColumns will be ignored)" VerticalAlignment="Center" />

        <controls:DragDockPanelHost Grid.Row="3" x:Name="dragDockPanelHost" Grid.ColumnSpan="3" Margin="0,10,0,0">
            <controls:DragDockPanel Margin="15" Header="Panel 1">
                <TextBlock Text="C O N T E N T"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
                           Foreground="#44ffffff"
                           FontFamily="Verdana"
                           FontSize="14"
                           />
            </controls:DragDockPanel>
            <controls:DragDockPanel Margin="15" Header="Panel 2">
                <TextBlock Text="C O N T E N T"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
                           Foreground="#44ffffff"
                           FontFamily="Verdana"
                           FontSize="14"
                           />
            </controls:DragDockPanel>
            <controls:DragDockPanel Margin="15" Header="Panel 3">
                <TextBlock Text="C O N T E N T"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
                           Foreground="#44ffffff"
                           FontFamily="Verdana"
                           FontSize="14"
                           />
            </controls:DragDockPanel>
            <controls:DragDockPanel Margin="15" Header="Panel 4">
                <TextBlock Text="C O N T E N T"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
                           Foreground="#44ffffff"
                           FontFamily="Verdana"
                           FontSize="14"
                           />
            </controls:DragDockPanel>
            <controls:DragDockPanel Margin="15" Header="Panel 5">
                <TextBlock Text="C O N T E N T"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
                           Foreground="#44ffffff"
                           FontFamily="Verdana"
                           FontSize="14"
                           />
            </controls:DragDockPanel>
            <controls:DragDockPanel Margin="15" Header="Panel 6">
                <TextBlock Text="C O N T E N T"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
                           Foreground="#44ffffff"
                           FontFamily="Verdana"
                           FontSize="14"
                           />
            </controls:DragDockPanel>
        </controls:DragDockPanelHost>
    </Grid>
</UserControl>
